<!--
 * @Author: your name
 * @Date: 2020-10-18 14:43:27
 * @LastEditTime: 2020-10-18 15:22:16
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \vue3\src\components\tab\index.vue
-->
<template>
  <div class="tab">
      <div class="tab-item"
      v-for="(item,i) of tabData"
      :key="i"
      >
          <tab-icon
          :iconText="item.iconText"
          :path="item.path"
           >{{item.tabText}}</tab-icon>

      </div>
  </div>
</template>

<script>
import tabData from '@/data/tab'
import TabIcon from './icon'
import {reactive} from 'vue'
export default {
    name:"Tab",
components:{TabIcon},
    setup(){
        const state=reactive({tabData})
  
        return {
            ...state
        }
    }
}
</script>

<style lang="scss" scoped>
  .tab {
    display: flex;
    flex-direction: row;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 1;
    width: 100%;
    height: .44rem;
    border-top: 1px solid #ddd;
    background-color: #fff;

    .tab-item {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 33.33%;
      height: 100%;
    }
  } 
</style>